home *** CD-ROM | disk | FTP | other *** search
- unit LVCtrl_TLB;
-
- // ************************************************************************ //
- // WARNING //
- // ------- //
- // The types declared in this file were generated from data read from a //
- // Type Library. If this type library is explicitly or indirectly (via //
- // another type library referring to this type library) re-imported, or the //
- // 'Refresh' command of the Type Library Editor activated while editing the //
- // Type Library, the contents of this file will be regenerated and all //
- // manual modifications will be lost. //
- // ************************************************************************ //
-
- // PASTLWTR : $Revision: 1.11.1.75 $
- // File generated on 12/2/98 4:05:41 PM from Type Library described below.
-
- // ************************************************************************ //
- // Type Lib: C:\My Documents\DelphiMag, Jan99\LVCtrl\LVCtrl.tlb
- // IID\LCID: {2C998C80-8899-11D2-9261-00104B700B61}\0
- // Helpfile:
- // HelpString: LVCtrl Library
- // Version: 1.0
- // ************************************************************************ //
-
- interface
-
- uses Windows, ActiveX, Classes, Graphics, OleCtrls, StdVCL;
-
- // *********************************************************************//
- // GUIDS declared in the TypeLibrary. Following prefixes are used: //
- // Type Libraries : LIBID_xxxx //
- // CoClasses : CLASS_xxxx //
- // DISPInterfaces : DIID_xxxx //
- // Non-DISP interfaces: IID_xxxx //
- // *********************************************************************//
- const
- LIBID_LVCtrl: TGUID = '{2C998C80-8899-11D2-9261-00104B700B61}';
- IID_IListViewX: TGUID = '{2C998C81-8899-11D2-9261-00104B700B61}';
- DIID_IListViewXEvents: TGUID = '{2C998C83-8899-11D2-9261-00104B700B61}';
- CLASS_ListViewX: TGUID = '{2C998C85-8899-11D2-9261-00104B700B61}';
- IID_IListItem: TGUID = '{1B5911E1-88A1-11D2-9261-00104B700B61}';
- CLASS_ListItem: TGUID = '{1B5911E3-88A1-11D2-9261-00104B700B61}';
- IID_IListItems: TGUID = '{C6B36444-88B1-11D2-9261-00104B700B61}';
- CLASS_ListItems: TGUID = '{C6B36446-88B1-11D2-9261-00104B700B61}';
-
- // *********************************************************************//
- // Declaration of Enumerations defined in Type Library //
- // *********************************************************************//
- // TxBiDiMode constants
- type
- TxBiDiMode = TOleEnum;
- const
- bdLeftToRight = $00000000;
- bdRightToLeft = $00000001;
- bdRightToLeftNoAlign = $00000002;
- bdRightToLeftReadingOnly = $00000003;
-
- // TxBorderStyle constants
- type
- TxBorderStyle = TOleEnum;
- const
- bsNone = $00000000;
- bsSingle = $00000001;
-
- // TxDragMode constants
- type
- TxDragMode = TOleEnum;
- const
- dmManual = $00000000;
- dmAutomatic = $00000001;
-
- // TxSortType constants
- type
- TxSortType = TOleEnum;
- const
- stNone = $00000000;
- stData = $00000001;
- stText = $00000002;
- stBoth = $00000003;
-
- // TxViewStyle constants
- type
- TxViewStyle = TOleEnum;
- const
- vsIcon = $00000000;
- vsSmallIcon = $00000001;
- vsList = $00000002;
- vsReport = $00000003;
-
- // TxItemFind constants
- type
- TxItemFind = TOleEnum;
- const
- ifData = $00000000;
- ifPartialString = $00000001;
- ifExactString = $00000002;
- ifNearest = $00000003;
-
- // TxMouseButton constants
- type
- TxMouseButton = TOleEnum;
- const
- mbLeft = $00000000;
- mbRight = $00000001;
- mbMiddle = $00000002;
-
- // TxListArrangement constants
- type
- TxListArrangement = TOleEnum;
- const
- arAlignBottom = $00000000;
- arAlignLeft = $00000001;
- arAlignRight = $00000002;
- arAlignTop = $00000003;
- arDefault = $00000004;
- arSnapToGrid = $00000005;
-
- // TxAlignment constants
- type
- TxAlignment = TOleEnum;
- const
- taLeftJustify = $00000000;
- taRightJustify = $00000001;
- taCenter = $00000002;
-
- type
-
- // *********************************************************************//
- // Forward declaration of interfaces defined in Type Library //
- // *********************************************************************//
- IListViewX = interface;
- IListViewXDisp = dispinterface;
- IListViewXEvents = dispinterface;
- IListItem = interface;
- IListItemDisp = dispinterface;
- IListItems = interface;
- IListItemsDisp = dispinterface;
-
- // *********************************************************************//
- // Declaration of CoClasses defined in Type Library //
- // (NOTE: Here we map each CoClass to its Default Interface) //
- // *********************************************************************//
- ListViewX = IListViewX;
- ListItem = IListItem;
- ListItems = IListItems;
-
-
- // *********************************************************************//
- // Declaration of structures, unions and aliases. //
- // *********************************************************************//
- POleVar = ^OleVariant;
-
-
- // *********************************************************************//
- // Interface: IListViewX
- // Flags: (4416) Dual OleAutomation Dispatchable
- // GUID: {2C998C81-8899-11D2-9261-00104B700B61}
- // *********************************************************************//
- IListViewX = interface(IDispatch)
- ['{2C998C81-8899-11D2-9261-00104B700B61}']
- function Get_AllocBy: Integer; safecall;
- procedure Set_AllocBy(Value: Integer); safecall;
- function Get_BiDiMode: TxBiDiMode; safecall;
- procedure Set_BiDiMode(Value: TxBiDiMode); safecall;
- function Get_BorderStyle: TxBorderStyle; safecall;
- procedure Set_BorderStyle(Value: TxBorderStyle); safecall;
- function Get_Checkboxes: WordBool; safecall;
- procedure Set_Checkboxes(Value: WordBool); safecall;
- function Get_Color: OLE_COLOR; safecall;
- procedure Set_Color(Value: OLE_COLOR); safecall;
- function Get_ColumnClick: WordBool; safecall;
- procedure Set_ColumnClick(Value: WordBool); safecall;
- function Get_Ctl3D: WordBool; safecall;
- procedure Set_Ctl3D(Value: WordBool); safecall;
- function Get_DragCursor: Smallint; safecall;
- procedure Set_DragCursor(Value: Smallint); safecall;
- function Get_DragMode: TxDragMode; safecall;
- procedure Set_DragMode(Value: TxDragMode); safecall;
- function Get_Enabled: WordBool; safecall;
- procedure Set_Enabled(Value: WordBool); safecall;
- function Get_Font: IFontDisp; safecall;
- procedure _Set_Font(const Value: IFontDisp); safecall;
- procedure Set_Font(var Value: IFontDisp); safecall;
- function Get_FlatScrollBars: WordBool; safecall;
- procedure Set_FlatScrollBars(Value: WordBool); safecall;
- function Get_FullDrag: WordBool; safecall;
- procedure Set_FullDrag(Value: WordBool); safecall;
- function Get_GridLines: WordBool; safecall;
- procedure Set_GridLines(Value: WordBool); safecall;
- function Get_HideSelection: WordBool; safecall;
- procedure Set_HideSelection(Value: WordBool); safecall;
- function Get_HotTrack: WordBool; safecall;
- procedure Set_HotTrack(Value: WordBool); safecall;
- function Get_MultiSelect: WordBool; safecall;
- procedure Set_MultiSelect(Value: WordBool); safecall;
- function Get_OwnerData: WordBool; safecall;
- procedure Set_OwnerData(Value: WordBool); safecall;
- function Get_OwnerDraw: WordBool; safecall;
- procedure Set_OwnerDraw(Value: WordBool); safecall;
- function Get_ReadOnly: WordBool; safecall;
- procedure Set_ReadOnly(Value: WordBool); safecall;
- function Get_RowSelect: WordBool; safecall;
- procedure Set_RowSelect(Value: WordBool); safecall;
- function Get_ParentColor: WordBool; safecall;
- procedure Set_ParentColor(Value: WordBool); safecall;
- function Get_ParentFont: WordBool; safecall;
- procedure Set_ParentFont(Value: WordBool); safecall;
- function Get_ShowColumnHeaders: WordBool; safecall;
- procedure Set_ShowColumnHeaders(Value: WordBool); safecall;
- function Get_SortType: TxSortType; safecall;
- procedure Set_SortType(Value: TxSortType); safecall;
- function Get_ViewStyle: TxViewStyle; safecall;
- procedure Set_ViewStyle(Value: TxViewStyle); safecall;
- function Get_Visible: WordBool; safecall;
- procedure Set_Visible(Value: WordBool); safecall;
- function AlphaSort: WordBool; safecall;
- procedure Arrange(Code: TxListArrangement); safecall;
- function GetSearchString: WideString; safecall;
- function IsEditing: WordBool; safecall;
- procedure Scroll(DX: Integer; DY: Integer); safecall;
- function Get_SelCount: Integer; safecall;
- function StringWidth(const S: WideString): Integer; safecall;
- procedure UpdateItems(FirstIndex: Integer; LastIndex: Integer); safecall;
- function Get_VisibleRowCount: Integer; safecall;
- function Get_DoubleBuffered: WordBool; safecall;
- procedure Set_DoubleBuffered(Value: WordBool); safecall;
- procedure FlipChildren(AllLevels: WordBool); safecall;
- function DrawTextBiDiModeFlags(Flags: Integer): Integer; safecall;
- function DrawTextBiDiModeFlagsReadingOnly: Integer; safecall;
- function GetControlsAlignment: TxAlignment; safecall;
- procedure InitiateAction; safecall;
- function IsRightToLeft: WordBool; safecall;
- function UseRightToLeftAlignment: WordBool; safecall;
- function UseRightToLeftReading: WordBool; safecall;
- function UseRightToLeftScrollBar: WordBool; safecall;
- function Get_Cursor: Smallint; safecall;
- procedure Set_Cursor(Value: Smallint); safecall;
- function ClassNameIs(const Name: WideString): WordBool; safecall;
- procedure AboutBox; safecall;
- function Get_Items: IListItems; safecall;
- property AllocBy: Integer read Get_AllocBy write Set_AllocBy;
- property BiDiMode: TxBiDiMode read Get_BiDiMode write Set_BiDiMode;
- property BorderStyle: TxBorderStyle read Get_BorderStyle write Set_BorderStyle;
- property Checkboxes: WordBool read Get_Checkboxes write Set_Checkboxes;
- property Color: OLE_COLOR read Get_Color write Set_Color;
- property ColumnClick: WordBool read Get_ColumnClick write Set_ColumnClick;
- property Ctl3D: WordBool read Get_Ctl3D write Set_Ctl3D;
- property DragCursor: Smallint read Get_DragCursor write Set_DragCursor;
- property DragMode: TxDragMode read Get_DragMode write Set_DragMode;
- property Enabled: WordBool read Get_Enabled write Set_Enabled;
- property Font: IFontDisp read Get_Font write _Set_Font;
- property FlatScrollBars: WordBool read Get_FlatScrollBars write Set_FlatScrollBars;
- property FullDrag: WordBool read Get_FullDrag write Set_FullDrag;
- property GridLines: WordBool read Get_GridLines write Set_GridLines;
- property HideSelection: WordBool read Get_HideSelection write Set_HideSelection;
- property HotTrack: WordBool read Get_HotTrack write Set_HotTrack;
- property MultiSelect: WordBool read Get_MultiSelect write Set_MultiSelect;
- property OwnerData: WordBool read Get_OwnerData write Set_OwnerData;
- property OwnerDraw: WordBool read Get_OwnerDraw write Set_OwnerDraw;
- property ReadOnly: WordBool read Get_ReadOnly write Set_ReadOnly;
- property RowSelect: WordBool read Get_RowSelect write Set_RowSelect;
- property ParentColor: WordBool read Get_ParentColor write Set_ParentColor;
- property ParentFont: WordBool read Get_ParentFont write Set_ParentFont;
- property ShowColumnHeaders: WordBool read Get_ShowColumnHeaders write Set_ShowColumnHeaders;
- property SortType: TxSortType read Get_SortType write Set_SortType;
- property ViewStyle: TxViewStyle read Get_ViewStyle write Set_ViewStyle;
- property Visible: WordBool read Get_Visible write Set_Visible;
- property SelCount: Integer read Get_SelCount;
- property VisibleRowCount: Integer read Get_VisibleRowCount;
- property DoubleBuffered: WordBool read Get_DoubleBuffered write Set_DoubleBuffered;
- property Cursor: Smallint read Get_Cursor write Set_Cursor;
- property Items: IListItems read Get_Items;
- end;
-
- // *********************************************************************//
- // DispIntf: IListViewXDisp
- // Flags: (4416) Dual OleAutomation Dispatchable
- // GUID: {2C998C81-8899-11D2-9261-00104B700B61}
- // *********************************************************************//
- IListViewXDisp = dispinterface
- ['{2C998C81-8899-11D2-9261-00104B700B61}']
- property AllocBy: Integer dispid 1;
- property BiDiMode: TxBiDiMode dispid 2;
- property BorderStyle: TxBorderStyle dispid 3;
- property Checkboxes: WordBool dispid 4;
- property Color: OLE_COLOR dispid -501;
- property ColumnClick: WordBool dispid 5;
- property Ctl3D: WordBool dispid 6;
- property DragCursor: Smallint dispid 7;
- property DragMode: TxDragMode dispid 8;
- property Enabled: WordBool dispid -514;
- property Font: IFontDisp dispid -512;
- property FlatScrollBars: WordBool dispid 9;
- property FullDrag: WordBool dispid 10;
- property GridLines: WordBool dispid 11;
- property HideSelection: WordBool dispid 12;
- property HotTrack: WordBool dispid 13;
- property MultiSelect: WordBool dispid 14;
- property OwnerData: WordBool dispid 15;
- property OwnerDraw: WordBool dispid 16;
- property ReadOnly: WordBool dispid 17;
- property RowSelect: WordBool dispid 18;
- property ParentColor: WordBool dispid 19;
- property ParentFont: WordBool dispid 20;
- property ShowColumnHeaders: WordBool dispid 21;
- property SortType: TxSortType dispid 22;
- property ViewStyle: TxViewStyle dispid 23;
- property Visible: WordBool dispid 24;
- function AlphaSort: WordBool; dispid 25;
- procedure Arrange(Code: TxListArrangement); dispid 26;
- function GetSearchString: WideString; dispid 27;
- function IsEditing: WordBool; dispid 28;
- procedure Scroll(DX: Integer; DY: Integer); dispid 29;
- property SelCount: Integer readonly dispid 30;
- function StringWidth(const S: WideString): Integer; dispid 32;
- procedure UpdateItems(FirstIndex: Integer; LastIndex: Integer); dispid 33;
- property VisibleRowCount: Integer readonly dispid 34;
- property DoubleBuffered: WordBool dispid 37;
- procedure FlipChildren(AllLevels: WordBool); dispid 38;
- function DrawTextBiDiModeFlags(Flags: Integer): Integer; dispid 41;
- function DrawTextBiDiModeFlagsReadingOnly: Integer; dispid 42;
- function GetControlsAlignment: TxAlignment; dispid 43;
- procedure InitiateAction; dispid 45;
- function IsRightToLeft: WordBool; dispid 46;
- function UseRightToLeftAlignment: WordBool; dispid 51;
- function UseRightToLeftReading: WordBool; dispid 52;
- function UseRightToLeftScrollBar: WordBool; dispid 53;
- property Cursor: Smallint dispid 54;
- function ClassNameIs(const Name: WideString): WordBool; dispid 58;
- procedure AboutBox; dispid -552;
- property Items: IListItems readonly dispid 31;
- end;
-
- // *********************************************************************//
- // DispIntf: IListViewXEvents
- // Flags: (4096) Dispatchable
- // GUID: {2C998C83-8899-11D2-9261-00104B700B61}
- // *********************************************************************//
- IListViewXEvents = dispinterface
- ['{2C998C83-8899-11D2-9261-00104B700B61}']
- procedure OnClick; dispid 3;
- procedure OnDataHint(StartIndex: Integer; EndIndex: Integer); dispid 11;
- procedure OnDblClick; dispid 13;
- procedure OnKeyPress(var Key: Smallint); dispid 25;
- procedure OnResize; dispid 30;
- end;
-
- // *********************************************************************//
- // Interface: IListItem
- // Flags: (4416) Dual OleAutomation Dispatchable
- // GUID: {1B5911E1-88A1-11D2-9261-00104B700B61}
- // *********************************************************************//
- IListItem = interface(IDispatch)
- ['{1B5911E1-88A1-11D2-9261-00104B700B61}']
- function Get_Caption: WideString; safecall;
- procedure Set_Caption(const Value: WideString); safecall;
- function Get_Index: Integer; safecall;
- function Get_Checked: WordBool; safecall;
- procedure Set_Checked(Value: WordBool); safecall;
- function Get_SubItems: IStrings; safecall;
- procedure Set_SubItems(const Value: IStrings); safecall;
- property Caption: WideString read Get_Caption write Set_Caption;
- property Index: Integer read Get_Index;
- property Checked: WordBool read Get_Checked write Set_Checked;
- property SubItems: IStrings read Get_SubItems write Set_SubItems;
- end;
-
- // *********************************************************************//
- // DispIntf: IListItemDisp
- // Flags: (4416) Dual OleAutomation Dispatchable
- // GUID: {1B5911E1-88A1-11D2-9261-00104B700B61}
- // *********************************************************************//
- IListItemDisp = dispinterface
- ['{1B5911E1-88A1-11D2-9261-00104B700B61}']
- property Caption: WideString dispid 1;
- property Index: Integer readonly dispid 2;
- property Checked: WordBool dispid 3;
- property SubItems: IStrings dispid 4;
- end;
-
- // *********************************************************************//
- // Interface: IListItems
- // Flags: (4416) Dual OleAutomation Dispatchable
- // GUID: {C6B36444-88B1-11D2-9261-00104B700B61}
- // *********************************************************************//
- IListItems = interface(IDispatch)
- ['{C6B36444-88B1-11D2-9261-00104B700B61}']
- function Get__NewEnum: IUnknown; safecall;
- function Get_Item(Index: Integer): IListItem; safecall;
- function Get_Count: Integer; safecall;
- function Add: IListItem; safecall;
- procedure Remove(Index: Integer); safecall;
- property _NewEnum: IUnknown read Get__NewEnum;
- property Item[Index: Integer]: IListItem read Get_Item; default;
- property Count: Integer read Get_Count;
- end;
-
- // *********************************************************************//
- // DispIntf: IListItemsDisp
- // Flags: (4416) Dual OleAutomation Dispatchable
- // GUID: {C6B36444-88B1-11D2-9261-00104B700B61}
- // *********************************************************************//
- IListItemsDisp = dispinterface
- ['{C6B36444-88B1-11D2-9261-00104B700B61}']
- property _NewEnum: IUnknown readonly dispid -4;
- property Item[Index: Integer]: IListItem readonly dispid 0; default;
- property Count: Integer readonly dispid 1;
- function Add: IListItem; dispid 2;
- procedure Remove(Index: Integer); dispid 3;
- end;
-
-
- // *********************************************************************//
- // OLE Control Proxy class declaration
- // Control Name : TListViewX
- // Help String : ListViewX Control
- // Default Interface: IListViewX
- // Def. Intf. DISP? : No
- // Event Interface: IListViewXEvents
- // TypeFlags : (34) CanCreate Control
- // *********************************************************************//
- TListViewXOnDataHint = procedure(Sender: TObject; StartIndex: Integer; EndIndex: Integer) of object;
- TListViewXOnKeyPress = procedure(Sender: TObject; var Key: Smallint) of object;
-
- TListViewX = class(TOleControl)
- private
- FIListViewXEvents_OnClick: TNotifyEvent;
- FOnDataHint: TListViewXOnDataHint;
- FIListViewXEvents_OnDblClick: TNotifyEvent;
- FIListViewXEvents_OnKeyPress: TListViewXOnKeyPress;
- FOnResize: TNotifyEvent;
- FIntf: IListViewX;
- function GetControlInterface: IListViewX;
- function Get_Items: IListItems;
- protected
- procedure CreateControl;
- procedure InitControlData; override;
- public
- function AlphaSort: WordBool;
- procedure Arrange(Code: TxListArrangement);
- function GetSearchString: WideString;
- function IsEditing: WordBool;
- procedure Scroll(DX: Integer; DY: Integer);
- function StringWidth(const S: WideString): Integer;
- procedure UpdateItems(FirstIndex: Integer; LastIndex: Integer);
- procedure FlipChildren(AllLevels: WordBool);
- function DrawTextBiDiModeFlags(Flags: Integer): Integer;
- function DrawTextBiDiModeFlagsReadingOnly: Integer;
- function GetControlsAlignment: TxAlignment;
- procedure InitiateAction;
- function IsRightToLeft: WordBool;
- function UseRightToLeftAlignment: WordBool;
- function UseRightToLeftReading: WordBool;
- function UseRightToLeftScrollBar: WordBool;
- function ClassNameIs(const Name: WideString): WordBool;
- procedure AboutBox;
- property ControlInterface: IListViewX read GetControlInterface;
- property SelCount: Integer index 30 read GetIntegerProp;
- property VisibleRowCount: Integer index 34 read GetIntegerProp;
- property DoubleBuffered: WordBool index 37 read GetWordBoolProp write SetWordBoolProp;
- property Items: IListItems read Get_Items;
- published
- property TabStop;
- property Align;
- property ParentShowHint;
- property PopupMenu;
- property ShowHint;
- property TabOrder;
- property OnDragDrop;
- property OnDragOver;
- property OnEndDrag;
- property OnEnter;
- property OnExit;
- property OnStartDrag;
- property AllocBy: Integer index 1 read GetIntegerProp write SetIntegerProp stored False;
- property BiDiMode: TOleEnum index 2 read GetTOleEnumProp write SetTOleEnumProp stored False;
- property BorderStyle: TOleEnum index 3 read GetTOleEnumProp write SetTOleEnumProp stored False;
- property Checkboxes: WordBool index 4 read GetWordBoolProp write SetWordBoolProp stored False;
- property Color: TColor index -501 read GetTColorProp write SetTColorProp stored False;
- property ColumnClick: WordBool index 5 read GetWordBoolProp write SetWordBoolProp stored False;
- property Ctl3D: WordBool index 6 read GetWordBoolProp write SetWordBoolProp stored False;
- property DragCursor: Smallint index 7 read GetSmallintProp write SetSmallintProp stored False;
- property DragMode: TOleEnum index 8 read GetTOleEnumProp write SetTOleEnumProp stored False;
- property Enabled: WordBool index -514 read GetWordBoolProp write SetWordBoolProp stored False;
- property Font: TFont index -512 read GetTFontProp write SetTFontProp stored False;
- property FlatScrollBars: WordBool index 9 read GetWordBoolProp write SetWordBoolProp stored False;
- property FullDrag: WordBool index 10 read GetWordBoolProp write SetWordBoolProp stored False;
- property GridLines: WordBool index 11 read GetWordBoolProp write SetWordBoolProp stored False;
- property HideSelection: WordBool index 12 read GetWordBoolProp write SetWordBoolProp stored False;
- property HotTrack: WordBool index 13 read GetWordBoolProp write SetWordBoolProp stored False;
- property MultiSelect: WordBool index 14 read GetWordBoolProp write SetWordBoolProp stored False;
- property OwnerData: WordBool index 15 read GetWordBoolProp write SetWordBoolProp stored False;
- property OwnerDraw: WordBool index 16 read GetWordBoolProp write SetWordBoolProp stored False;
- property ReadOnly: WordBool index 17 read GetWordBoolProp write SetWordBoolProp stored False;
- property RowSelect: WordBool index 18 read GetWordBoolProp write SetWordBoolProp stored False;
- property ParentColor: WordBool index 19 read GetWordBoolProp write SetWordBoolProp stored False;
- property ParentFont: WordBool index 20 read GetWordBoolProp write SetWordBoolProp stored False;
- property ShowColumnHeaders: WordBool index 21 read GetWordBoolProp write SetWordBoolProp stored False;
- property SortType: TOleEnum index 22 read GetTOleEnumProp write SetTOleEnumProp stored False;
- property ViewStyle: TOleEnum index 23 read GetTOleEnumProp write SetTOleEnumProp stored False;
- property Visible: WordBool index 24 read GetWordBoolProp write SetWordBoolProp stored False;
- property Cursor: Smallint index 54 read GetSmallintProp write SetSmallintProp stored False;
- property IListViewXEvents_OnClick: TNotifyEvent read FIListViewXEvents_OnClick write FIListViewXEvents_OnClick;
- property OnDataHint: TListViewXOnDataHint read FOnDataHint write FOnDataHint;
- property IListViewXEvents_OnDblClick: TNotifyEvent read FIListViewXEvents_OnDblClick write FIListViewXEvents_OnDblClick;
- property IListViewXEvents_OnKeyPress: TListViewXOnKeyPress read FIListViewXEvents_OnKeyPress write FIListViewXEvents_OnKeyPress;
- property OnResize: TNotifyEvent read FOnResize write FOnResize;
- end;
-
- CoListItem = class
- class function Create: IListItem;
- class function CreateRemote(const MachineName: string): IListItem;
- end;
-
- CoListItems = class
- class function Create: IListItems;
- class function CreateRemote(const MachineName: string): IListItems;
- end;
-
- procedure Register;
-
- implementation
-
- uses ComObj;
-
- procedure TListViewX.InitControlData;
- const
- CEventDispIDs: array [0..4] of DWORD = (
- $00000003, $0000000B, $0000000D, $00000019, $0000001E);
- CTFontIDs: array [0..0] of DWORD = (
- $FFFFFE00);
- CControlData: TControlData2 = (
- ClassID: '{2C998C85-8899-11D2-9261-00104B700B61}';
- EventIID: '{2C998C83-8899-11D2-9261-00104B700B61}';
- EventCount: 5;
- EventDispIDs: @CEventDispIDs;
- LicenseKey: nil;
- Flags: $0000000D;
- Version: 401;
- FontCount: 1;
- FontIDs: @CTFontIDs);
- begin
- ControlData := @CControlData;
- TControlData2(CControlData).FirstEventOfs := Cardinal(@@FIListViewXEvents_OnClick) - Cardinal(Self);
- end;
-
- procedure TListViewX.CreateControl;
-
- procedure DoCreate;
- begin
- FIntf := IUnknown(OleObject) as IListViewX;
- end;
-
- begin
- if FIntf = nil then DoCreate;
- end;
-
- function TListViewX.GetControlInterface: IListViewX;
- begin
- CreateControl;
- Result := FIntf;
- end;
-
- function TListViewX.Get_Items: IListItems;
- begin
- Result := ControlInterface.Get_Items;
- end;
-
- function TListViewX.AlphaSort: WordBool;
- begin
- Result := ControlInterface.AlphaSort;
- end;
-
- procedure TListViewX.Arrange(Code: TxListArrangement);
- begin
- ControlInterface.Arrange(Code);
- end;
-
- function TListViewX.GetSearchString: WideString;
- begin
- Result := ControlInterface.GetSearchString;
- end;
-
- function TListViewX.IsEditing: WordBool;
- begin
- Result := ControlInterface.IsEditing;
- end;
-
- procedure TListViewX.Scroll(DX: Integer; DY: Integer);
- begin
- ControlInterface.Scroll(DX, DY);
- end;
-
- function TListViewX.StringWidth(const S: WideString): Integer;
- begin
- Result := ControlInterface.StringWidth(S);
- end;
-
- procedure TListViewX.UpdateItems(FirstIndex: Integer; LastIndex: Integer);
- begin
- ControlInterface.UpdateItems(FirstIndex, LastIndex);
- end;
-
- procedure TListViewX.FlipChildren(AllLevels: WordBool);
- begin
- ControlInterface.FlipChildren(AllLevels);
- end;
-
- function TListViewX.DrawTextBiDiModeFlags(Flags: Integer): Integer;
- begin
- Result := ControlInterface.DrawTextBiDiModeFlags(Flags);
- end;
-
- function TListViewX.DrawTextBiDiModeFlagsReadingOnly: Integer;
- begin
- Result := ControlInterface.DrawTextBiDiModeFlagsReadingOnly;
- end;
-
- function TListViewX.GetControlsAlignment: TxAlignment;
- begin
- Result := ControlInterface.GetControlsAlignment;
- end;
-
- procedure TListViewX.InitiateAction;
- begin
- ControlInterface.InitiateAction;
- end;
-
- function TListViewX.IsRightToLeft: WordBool;
- begin
- Result := ControlInterface.IsRightToLeft;
- end;
-
- function TListViewX.UseRightToLeftAlignment: WordBool;
- begin
- Result := ControlInterface.UseRightToLeftAlignment;
- end;
-
- function TListViewX.UseRightToLeftReading: WordBool;
- begin
- Result := ControlInterface.UseRightToLeftReading;
- end;
-
- function TListViewX.UseRightToLeftScrollBar: WordBool;
- begin
- Result := ControlInterface.UseRightToLeftScrollBar;
- end;
-
- function TListViewX.ClassNameIs(const Name: WideString): WordBool;
- begin
- Result := ControlInterface.ClassNameIs(Name);
- end;
-
- procedure TListViewX.AboutBox;
- begin
- ControlInterface.AboutBox;
- end;
-
- class function CoListItem.Create: IListItem;
- begin
- Result := CreateComObject(CLASS_ListItem) as IListItem;
- end;
-
- class function CoListItem.CreateRemote(const MachineName: string): IListItem;
- begin
- Result := CreateRemoteComObject(MachineName, CLASS_ListItem) as IListItem;
- end;
-
- class function CoListItems.Create: IListItems;
- begin
- Result := CreateComObject(CLASS_ListItems) as IListItems;
- end;
-
- class function CoListItems.CreateRemote(const MachineName: string): IListItems;
- begin
- Result := CreateRemoteComObject(MachineName, CLASS_ListItems) as IListItems;
- end;
-
- procedure Register;
- begin
- RegisterComponents('ActiveX',[TListViewX]);
- end;
-
- end.
-